﻿<%@ Page Title="权限管理" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="PrivilegeManage.aspx.cs" Inherits="StoragePeriod.Web.SysManage.PrivilegeManage" %>
<%@ Register src="UC_PrivMenu.ascx" tagname="UC_PrivMenu" tagprefix="uc1" %>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
    .layout{ background:url(../images/images_59.jpg) no-repeat;}
    .left-cloumn{display:none;}
    .right-cloumn{width:944px;}
    #sms_title_li_0{ background:url(../images/images_55.jpg) no-repeat;}
    .Left_Search{width:190px;padding-left:10px; height:30px;border-top:1px solid #ccc;}
    .right_Stafflist{ overflow:auto;}
</style>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainLeft" runat="server">
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="MainContent" runat="server">
<div class="sms_title">
    <ul>
        <li><a href="OperationManage.aspx">基础设置</a></li>
        <li><a href="PrivilegeManage.aspx" style="color:#f90;">权限管理</a></li>
        <li><a href="PersonnelManage.aspx">人员管理</a></li>
    </ul>
</div>
<div class="sms_main">
    <div class="BasicData_left">
        <h2>权限设置</h2>
        <uc1:UC_PrivMenu ID="UC_PrivMenu1" runat="server" ShowId="1"/>
    </div>
    <div class="BasicData_right">
        <script type="text/javascript">
            function IsV() {
                var b = true;
                if ($("#MainContent_txt_UserCode").val().toString() == "") {
                    b = false;
                    alert("用户名不能为空!");
                }

                if ($("#MainContent_txt_UserPWD").val() != $("#MainContent_txt_UserPWD2").val()) {
                    b = false;
                    alert("两次密码输入不一致！");
                }
                return b;
            }

            function ShowDlg(IsEdit) {
                $("#dialog-form").dialog('open');
            }

            function LoadData(UserCode, RoleCode, UserPWD) {
                $("#MainContent_txt_UserCode").val(UserCode);
                $("#MainContent_Drop_RoleList").val(RoleCode);
                $("#MainContent_txt_UserPWD").val(UserPWD);
                $("#MainContent_txt_UserPWD2").val(UserPWD);
            }

            function alertstr(str) {
                alert(str);
            }
</script>

<asp:UpdatePanel ID="upPanelMain" runat="server">
    <ContentTemplate>
    <asp:HiddenField ID="HidTypeID" runat="server" />
    <asp:HiddenField ID="HidIsEdit" runat="server" />
<div class="BasicDataBtn">
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td align="right" style="width:60px;">单位：</td>
                    <td align="left" style="width:110px;"><asp:DropDownList ID="Drop_OperationSearch" 
                            runat="server" style="width:100px;" 
                            onselectedindexchanged="Drop_OperationSearch_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList></td>
                    <td align="right" style="width:60px;">班组：</td>
                    <td align="left" style="width:110px;"><asp:DropDownList ID="Drop_TeamSearch" runat="server" style="width:100px;"></asp:DropDownList></td>
                    <td align="right" style="width:60px;">姓名：</td>
                    <td align="left" style="width:150px;"><asp:TextBox ID="txt_searchName" runat="server" CssClass="txt_0"></asp:TextBox></td>
                    <td align="left"><asp:Button ID="Btn_Search" runat="server" Text="查询"  CssClass="btn_0" onclick="Btn_Search_Click" /></td>
                    <td style="width:10px;"></td>
                </tr>
            </table>
        </div>

        <div class="BasicDataList">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="BasicDataTable">
                <thead>
                    <tr>
                        <td style="width:60px;">序号</td>
                        <td>用户名称</td>
                        <td>角色</td>
                        <td>班组</td>
                        <td>Email</td>
                        <td>电话号码</td>
                        <td style="width:120px;">操作</td>  
                    </tr>
                </thead>
                <tbody>
                    <asp:Repeater ID="RepDataList" runat="server" onitemcommand="RepDataList_ItemCommand">
                        <ItemTemplate>
                            <tr>
                                <td><%=GetXH()%></td>
                                <td><%#Eval("UserName")%></td>
                                <td><%#Eval("RoleName")%></td>
                                <td><%#GetTeamName(Eval("UserType").ToString())%></td>
                                <td><%#Eval("EMail")%></td>
                                <td><%#Eval("MobileTelNo")%></td>
                                <td><asp:Button ID="RepBtn_Edit" Text="编辑用户" runat="server" CommandName="Edit" CommandArgument=<%#Eval("id")%> /></td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </tbody>
            </table>
        </div>
        </ContentTemplate>
</asp:UpdatePanel>

<div class="sp-dialog-box" id="dialog-form" style=" width:450px;" title="编辑用户">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
    <table class="sp-input-table " border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td>角色：</td>
            <td style="padding:5px 0px;">
                <asp:DropDownList ID="Drop_RoleList" runat="server" style="width:80%"></asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>登录名称：</td>
            <td>
                <asp:TextBox runat="server" class="text ui-widget-content ui-corner-all" style="width:80%" ID="txt_UserCode" />
            </td>
        </tr>
        <tr>
            <td>登录密码：</td>
            <td>
                <asp:TextBox runat="server" class="text ui-widget-content ui-corner-all" TextMode="Password" ID="txt_UserPWD" style="width:80%"/>
            </td>
        </tr>
        <tr>
            <td>确认密码：</td>
            <td>
                <asp:TextBox runat="server" class="text ui-widget-content ui-corner-all" TextMode="Password" ID="txt_UserPWD2" style="width:80%"/>
            </td>
        </tr>
        <tr>
            <td colspan="8">
                <asp:Button Text="提交" CssClass="die" runat="server" ID="btPost" OnClientClick="return IsV()" OnClick="btPost_Click" />
            </td>
        </tr>
    </table>
    
    </ContentTemplate>
            </asp:UpdatePanel>
</div>
    </div>
</div>
<div class="sms_foot">
<asp:HiddenField ID="hdRoleCode" runat="server" />
    <img src="../images/images_58.jpg" width="944" height="8" class="float_left" />
</div>
</asp:Content>